//
//  QLMyBookOrderDetailVC.m
//  神约
//
//  Created by qlwl on 17/2/22.
//  Copyright © 2017年 qlwl. All rights reserved.
//

#import "QLMyBookOrderDetailVC.h"
#import "QLMyBookOrderDetialCell.h"

@interface QLMyBookOrderDetailVC ()
@property (weak, nonatomic) IBOutlet UITableView *tableView;

@end

@implementation QLMyBookOrderDetailVC

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

#pragma mark TabDelegate
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
    return 3;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 1;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    if (indexPath.section == 0) {
        QLMyBookDetialStateCell * cell = [tableView dequeueReusableCellWithIdentifier:@"QLMyBookDetialStateCell"];
        return cell;
    }else if (indexPath.section == 1){
        QLMyBookDetialUserInfoCell * cell = [tableView dequeueReusableCellWithIdentifier:@"QLMyBookDetialUserInfoCell"];
        return cell;
    }else{
        QLMyBookOrderDetialCell * cell = [tableView dequeueReusableCellWithIdentifier:@"QLMyBookOrderDetialCell"];
        return cell;
    }
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    if (indexPath.section == 0) {
        return 36;
    }else if (indexPath.section == 1){
        return 66;
    }else{
        return 226;
    }
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    
}

- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
    if (section == 1) {
        return 30;
    }else if (section == 2){
        return 30;
    }
    return 0;
}
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section
{
    return @[@"",@"对方信息",@"对Ta评价"][section];
}

@end
